﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers.waitingQueue {
    import net.wooga.pets.events.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;
    import net.wooga.pets.models.world.*;

    public class AddNewWaitingPetToQueueCommand extends Command {

        public var event:InfoEvent;
        public var worldModel:WorldModel;

        override public function execute():void{
            var _local3:int;
            var _local1:Array = (this.event.info as Array);
            if (((_local1) && ((_local1.length == 0)))){
                return;
            };
            var _local2:Array = [];
            for each (_local3 in _local1) {
                _local2.push(this.worldModel.addToWaitingQueue(_local3));
            };
            dispatch(new InfoEvent(EventConstants.LOAD_WAITING_PET, null, _local2));
        }

    }
}//package net.wooga.pets.controllers.waitingQueue 
